<?php
class Shop_Model_DbTable_Image_Row extends Zend_Db_Table_Row_Abstract {
	protected function _update() {
		if (isset($this->image)) {
			if ($this->image == '') {
				unset($this->image);
			}
		}
	}

	protected function _delete() {
		if (isset($this->image)) {
			$path = Shop_Model_Image::UPLOAD_PATH . DIRECTORY_SEPARATOR . $this->image;
			if (is_file($path)) {
				@unlink($path);
			}
		}
	}
}